package org.opens.converter;

/**
 * 功能描述
 *
 * @author by zhangyuming
 * @date 2023/3/7
 */
public enum ConverterFactoryKey {

    SQL_TYPE_CONVERTER_FACTORY("SQL_TYPE_CONVERTER_FACTORY", "数据库列转换器工厂"),
    MYBATIS_JDBC_TYPE_CONVERTER_FACTORY("MYBATIS_JDBC_TYPE_CONVERTER_FACTORY", "mybatis类型转换工厂");

    private String value;

    private String desc;

    ConverterFactoryKey(String typeName, String desc) {
        this.value = typeName;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public static ConverterFactoryKey getInstance(String value) {
        for (ConverterFactoryKey item : ConverterFactoryKey.values()) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return null;
    }

}
